PRINT '-------------------------------------------'
PRINT 'Starting execution of UM_Users.SQL'
PRINT '-------------------------------------------'
GO

SET QUOTED_IDENTIFIER OFF
SET ANSI_NULLS ON         -- We don't want (NULL = NULL) == TRUE
GO
SET ANSI_PADDING ON
GO
SET ANSI_NULL_DFLT_ON ON
GO




IF (NOT EXISTS (SELECT name
                FROM sysobjects
                WHERE (name = N'UM_Users')
                  AND (type = 'U')))
BEGIN
	  CREATE TABLE [dbo].[UM_Users](
			[ApplicationId] [uniqueidentifier] NOT NULL FOREIGN KEY REFERENCES dbo.aspnet_Applications(ApplicationId),
			[UserId] [uniqueidentifier] NOT NULL FOREIGN KEY REFERENCES dbo.aspnet_Users(UserId),
			[FName] [varchar](30) NULL,
			[LName] [varchar](30) NULL,
			[Gender] [varchar](1) NULL,
			[DateOfBirth] [smalldatetime] NULL,
			[Address1] [varchar](100) NULL,
			[Address2] [varchar](100) NULL,
			[City] [varchar](50) NULL,
			[State] [varchar](2) NULL,
			[Country] [varchar](2) NULL,
			[Contact1] [varchar](12) NULL,
			[Contact2] [varchar](12) NULL,
			[JoinDate] [smalldatetime] NULL,
			[IsActive] [bit] NULL,
			[LastUpdBy] [varchar](25) NULL,
			[LastUpdDt] [smalldatetime] NULL
		 CONSTRAINT [PK_UM_Users_1] PRIMARY KEY CLUSTERED 
		(
			[ApplicationId] ASC,
			[UserId] ASC
		)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
		) ON [PRIMARY]
END
GO



PRINT '--------------------------------------------'
PRINT 'Completed execution of UM_Users.SQL'
PRINT '--------------------------------------------'

